package com.dfbz.demo;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo08_字符串的创建综合练习 {
public static void main(String[] args) {
    String s1 = "abc";
    String s2 = "abc";
    String s3 = "ab" + "c";
    String s4 = "ab" + new String("c");
    String s5 = new String("abc");
    String s6 = "a";
    String s7 = "bc";
    String s8 = s6 + s7;

    System.out.println(s1 == s2);
    System.out.println(s1 == s3);
    System.out.println(s1 == s4);
    System.out.println(s1 == s8);
    System.out.println(s4 == s5);
}
}
